package com.yxw.yx_hotel.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * @author liuxin
 * @date 2023.0913
 */
@EqualsAndHashCode(callSuper = false)
@Data
@ToString(callSuper=true)
@ApiModel(value="AddRoomRepairDto", description="宿舍报修新增Dto")
public class AddRoomRepairDto implements Serializable {

    @NotNull(message = "宿舍ID不能为空")
    @ApiModelProperty(value = "宿舍ID")
    private Long roomId;

    @NotBlank(message = "宿舍名称不能为空")
    @ApiModelProperty(value = "宿舍名称")
    private String roomName;

    @NotNull(message = "物品ID不能为空")
    @ApiModelProperty(value = "物品ID(资产ID)")
    private Long propertyId;

    @NotBlank(message = "物品名称不能为空")
    @ApiModelProperty(value = "物品名称(资产名称)")
    private String propertyName;

    @NotBlank(message = "报修人不能为空")
    @ApiModelProperty(value = "报修人")
    private String userName;

    @NotBlank(message = "报修内容不能为空")
    @ApiModelProperty(value = "报修内容")
    private String note;

    @ApiModelProperty(value="报修时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date repairTime;

    @NotNull(message = "是否报修房必选")
    @ApiModelProperty(value="是否报修房 0：否  1：是")
    private int repairType;
}
